<?php
	//session_start();
	$ses_user_id =$_SESSION['ses_user_id'];
	$ses_std_id = $_SESSION['ses_std_id'];

	if($ses_user_id <> session_id() or  $ses_std_id ==''){
	echo "Authentication failed";
	echo "<meta http-equiv='refresh' content='2;URL=index.php' />";
	}    
	else {
		
			////////////////////////////HEADER///////////////////////////////
			//include ("db_connect.php");
			$query="SELECT * FROM students WHERE std_id=$ses_std_id";
			$db_result=db_query($query);
			$result=mysql_fetch_array($db_result);
?>
			<style type="text/css">
            <!--
            body {
                margin-left: 0px;
                margin-top: 0px;
                margin-right: 0px;
                margin-bottom: 0px;
                text-align: right;
            }
            -->
            </style> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><div align="right"><tt><?php echo $result['std_name']; ?> <a href="logout.php">Logout</a></tt></div></td>
              </tr>
            </table>
<?php
	}
	?>
